﻿<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>cookies Page</title>

    <link href="../../jquery-easyui-theme/default/easyui.css" rel="stylesheet" />
    <link href="../../jquery-easyui-theme/icon.css" rel="stylesheet" />
    <link href="../../icons/icon-all.css" rel="stylesheet" />

    <script src="../../jquery/jquery-1.10.2.js" type="text/javascript"></script>
    <script src="../../jquery-easyui-1.3.6/jquery.easyui.min.js" type="text/javascript" ></script>
    <script src="../../jquery-easyui-1.3.6/locale/easyui-lang-zh_CN.js" type="text/javascript" ></script>
    
    <script src="../../jquery.jdirk.js" type="text/javascript" ></script>
    <script src="../../jeasyui-extensions/jeasyui.extensions.js" type="text/javascript" ></script>

    <script type="text/javascript" >
        $(function () {
            var name = $("#Text1"),
                value = $("#Text2"),
                expires = $("#Text3"),
                btn1 = $("#btn1").click(function () {
                    $.cookie(name.val(), value.val(), { expires: expires.val() });
                }),
                btn2 = $("#btn2").click(function () {
                    alert($.cookie(name.val()));
                }),
                btn3 = $("#btn3").click(function () {
                    $.removeCookie(name.val());
                });
        });
    </script>

    <style type="text/css"></style>

</head>
<body>
    cookie name:<input id="Text1" type="text" value="cookie_key" /><br />
    cookie value:<input id="Text2" type="text" value="" /><br />
    cookie expires(days):<input id="Text3" type="text" class="easyui-numberbox" data-options="value: 0, min: 1, max: 30" /><br />

    <input id="btn1" type="button" value="SetCookie" />
    <input id="btn2" type="button" value="GetCookie" />
    <input id="btn3" type="button" value="RemoveCookie" />
</body>
</html>
